package Controller;

import Model.*;


/**
 * @author not attributable
 * @version 1.0
 */
public class SimplePerformanceTest implements ChessConstants {
  private Board board;

  public static void main (String args[]) {
    new SimplePerformanceTest();
  }

  public SimplePerformanceTest() {
    board = new Board();
    Move tempMove = new Move((byte)0x11, (byte)0x22, PIECE_NONE, PIECE_PAWN, (byte)0);

    long timeStart = System.currentTimeMillis();
    for (int i = 0; i < 1000000; i++)
      board.recalcZobristHash();
    long timeEnd = System.currentTimeMillis();

    System.out.println ("Recalc: " + (timeEnd-timeStart));


    timeStart = System.currentTimeMillis();
    for (int i = 0; i < 1000000; i++)
      board.modifyZobristHash(tempMove);
    timeEnd = System.currentTimeMillis();

    System.out.println ("Modify: " + (timeEnd-timeStart));
  }
}
